// 用户相关的接口
import request from '@/utils/request'
import type {
  loginFormData,
  loginResponseData,
  userInfoResponseData,
} from './type'
enum API {
  LOGIN_URL = '/user/login', //登录接口
  USERINFO_URL = '/user/info', //获取用户信息接口
}

// 登录
export const reqLogin = (data: loginFormData) =>
  request.post<any, loginResponseData>(API.LOGIN_URL, data)
// 获取用户信息
export const reqUserInfo = () =>
  request.get<userInfoResponseData>(API.USERINFO_URL)
